feat(cli/rustup-mode): add rustup ci subcommand - #5021
Conversation
| CARGO_PROFILE_DEV_DEBUG=0 | ||
| CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse | ||
| CARGO_TERM_COLOR=always | ||
| CARGO_UNSTABLE_SPARSE_REGISTRY=true |
There was a problem hiding this comment.
As per https://github.com/actions-rust-lang/setup-rust-toolchain/blob/8439c15d249cd2e2a5c80ad3da200c3d8c553ae4/action.yml#L145-L149 this will be a no-op on cargo versions that don't support this flag.
| @@ -0,0 +1,6 @@ | |||
| CARGO_INCREMENTAL=0 | |||
| CARGO_PROFILE_DEV_DEBUG=0 | |||
| CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse | |||
There was a problem hiding this comment.
@weihanglo Is it safe to always set this flag similarly to #5021 (comment)?
There was a problem hiding this comment.
For incremental I think so. Cargo shipped a similar thing recently: rust-lang/cargo#17220
For profile dev debug, Cargo will have a new debug profile and we planned to turn off debug for dev profile:
rust-lang/cargo#17214. So, the direction looks pretty aligned.
For registry protocol, we may want to test if there is any version treating it as a hard error if not recognized. I believe no but worth a double check.
There was a problem hiding this comment.
probably could test pre-1.61 1.61 to 1.68, and post 1.68
|
Feel free to use my solution for whatever you need👍 |
d5a9f89 to
5917940
Compare
|
@r7kamura Thanks a lot for the extra context! I've made you the co-author for this commit as a sign of appreciation. |
|
FWIW, I created this thread for t-cargo to take a look, in case others have some ideas/concerns for the cargo part. |
Co-authored-by: r7kamura <r7kamura@gmail.com>
5917940 to
2a3e6b2
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Part of #5011.
This first version has implemented a few main subcommands:
rustup ci env: prints a hardcodedbase.envtaken from Provide a built-in way for rustup to adapt to a CI environment #5011 (comment).rustup ci problem-matcher github: prints a hardcoded problem matcher configuration for GitHub1.Footnotes
Taken from @r7kamura's solution (https://github.com/r7kamura/rust-problem-matchers/blob/7e46a19e8d2f3a44f97b551aee14a7b3cc18fcd0/.github/matchers.json) since it seems to be the most comprehensive of all. ↩